<?php
/**
 * 门店管理
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/3
 * Time: 9:45
 */
class Controller_Wwwmall2_Store extends FController{

    function beforeAction(){
        global $_F;
        $_F['s_url'] = 'http://img1.yuanfenba.net';
        $_F['s_url_oss'] = 'http://image1.yuanfenba.net';
        return true;
    }

    function listAction(){
        $shopTable = new FTable('chain_shop','','xhs_slave');
        $shopList = $shopTable->where(array('status'=>1))->select();
        $this->assign('shopList',$shopList);
        $this->display('store/list');
    }

    function rangeAction(){
        $this->display('store/range');
    }

    function showMessage($message, $msgType, $url = null)
    {
        echo "<script>alert('{$message}');";
        if ($url) echo "location='{$url}';";
        echo "</script>";
    }
}